from PySide6.QtWidgets import QApplication, QMainWindow, QMenu
from PySide6.QtGui import QAction
app = QApplication([])

win = QMainWindow()
win.show()

bar = win.menuBar()

menu = QMenu(win)
for text in ['Alpha', 'Bravo', 'Charlie']:
    act = QAction(text)
    act.setCheckable(True)      # 关键：允许对号
    act.setChecked(text == 'Bravo')  # 默认勾第二个
    menu.addAction(act)

# 把菜单挂到按钮
bar.addMenu('File')
bar.addMenu(menu)


app.exec_()